home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / BlitzBasic / VS-Includes / TextEntry / TextEntry.DOC < prev    next >
Encoding:
Text File  |  1998-06-24  |  4.1 KB  |  122 lines

  1.  
  2.                                TextEntry Library
  3.                                =================
  4.  
  5.                                      V1.05
  6.  
  7.                              Last Updated 7/1/95
  8.  
  9.    This library is freeware - copy it - modify it whatever - but If you do use
  10. it I would like some form of credit given in the program/documentation.
  11.  
  12. NOTE: YOU MUST HAVE THE ELMORELIB LIBRARY FOR THESE FUNCTIONS TO WORK!
  13.       PLEASE CHECK THE CODE FOR DETAILS.
  14.  
  15. FUNCTIONS
  16. =========
  17.  
  18.    TextEntrySetup{GadgetList,FileName$,Shape}
  19.    ==========================================
  20.  
  21.    The TextEntry routine uses two little shapegadgets for the up and down
  22. arrows, and this little function sets up the loading of the Gfx for those.
  23. The Gfx are contained in the file TextEntry.Gfx.  This function can be used
  24. to load those Gfx by specifying the filename (including path) and the shape
  25. number to load the up gadget into - the down gadget will be in Shape+1.
  26. GadgetList is just a spare GadgetList that you have that the TextEntry window
  27. can use.
  28.    If you incorporate the up/down gadgets into your own shape file, then you
  29. should not specify a filename - ie FileName$="", and specify with Shape the
  30. Shape which you have loaded them as.  The two shapes MUST be kept in the same
  31. order and next to each other.
  32.     This function was changed in V1.01 so that it no longer changes the
  33. Borderpens setting - this was originally set just for WB2+ machines.  It is
  34. best if you always set it before setting up gadgets, for WB2+ it is
  35.  
  36.     BorderPens 2,1
  37.  
  38. and for WB1.3 it is
  39.  
  40.    BorderPens 1,2
  41.  
  42.    It is easy to set up a routine that tests for what ROM we are using with
  43. ExecVersion<=35 (i think) for 1.3 and lower, and then it can adjust the
  44. display correctly.
  45.    If you cant work it out, such code would look something like...
  46.  
  47.    If ExecVersion<=35
  48.        Borderpens 1,2
  49.    Else
  50.        Borderpens 2,1
  51.    Endif
  52.  
  53.    TextEntryPostion{x,y,w,h}
  54.    =========================
  55.  
  56.    This function will postion the window at the specified screen coordinates
  57. with the specified width and height (actual window size NOT text lines.
  58.    Specifying any of these as -1 will leave their values unchanged, thus leaving
  59. those things as they were last left or as the default.  This does NOT need to
  60. be called.
  61.  
  62.    result$=TextEntry{Window,Title$,EditText$,MaxChars}
  63.    ===================================================
  64.  
  65.    This is the actual routine - Window is the Window number that will be used,
  66. opening on the current screen.  Title$ is the title of the window, and
  67. EditText$ is the text to be edited.  MaxChars is the Maximum number of
  68. characters that may be entered.
  69.     Please note that there can be a lag of the key repeat on slower machines
  70. when using exceedingly large windows (on my 1200, 4MB Fast RAM, '020 it only gets
  71. lagged if the window is full screen (640x256).  As it is unlikely these sizes
  72. will be required, this odes not pose a massive problem, but I am trying to
  73. optimize the screen updating part of the code - if anyone can improve on my code
  74. LET ME KNOW!!! - I changed everything I can think in V1.01 to get it faster!
  75.  
  76. AUTHOR
  77. ======
  78.  
  79.    Contact me (Mark Tiffany) at
  80.  
  81.          37 Norfolk Road
  82.          Littlehampton
  83.          West Sussex
  84.          BN17 5PW
  85.  
  86.    or on PHY93003@bham.ac.uk during University term times.
  87.  
  88. UPDATES
  89. =======
  90.  
  91.    V1.05 7/1/95
  92.    =====
  93.     Font sensitivity didnt work, so its no longer present.  Sorry.
  94.  
  95.    V1.04 6/10/94
  96.    =====
  97.    Now font sensitive (I hope!) - should now the system font happily and fit the
  98.    text in correctly, draw gadgets ok, etc.
  99.  
  100.    V1.03 8/9/94
  101.    =====
  102.    Window now cannot be sized smaller than the minimum (If you've used older
  103.    versions then you'll know what I mean).
  104.  
  105.    V1.02 21/7/94
  106.    =====
  107.    Text update improved again.  Minor bug that occurrred when calling the
  108.    routine many times removed.
  109.  
  110.    V1.01 29/6/94
  111.    =====
  112.    Text update improved - less lag in really large windows.
  113.    BorderPens command removed from SETUP, so now you should set it up, and
  114.    they will not be changed by the SETUP command.
  115.    ESC now quits the editing window - ie hits Cancel.
  116.  
  117.    V1.00
  118.    =====
  119.    Funnily enough this is the original.  Caught you out there didnt I?
  120.  
  121.  
  122.